package view;

import java.awt.*;

import javax.swing.*;

public class gui {

	JFrame frame;
	JPanel panel;
	JTextField textfield;
	JButton b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, add, sub, mul, div, equal,
			clear;
	Color color;

	public gui() {
		color = new Color(0, 0, 0);

		frame = new JFrame();
		frame.setBackground(color);
		frame.setLayout(new BorderLayout());
		
		panel = new JPanel();
		panel.setLayout(new GridLayout(4,4));

		textfield = new JTextField();
		textfield.setSize(50, 20);

		b0 = new JButton("0");
		b1 = new JButton("1");
		b2 = new JButton("2");
		b3 = new JButton("3");
		b4 = new JButton("4");
		b5 = new JButton("5");
		b6 = new JButton("6");
		b7 = new JButton("7");
		b8 = new JButton("8");
		b9 = new JButton("9");
		
		add = new JButton("+");
		sub = new JButton("-");
		mul = new JButton("*");
		div = new JButton("/");
		equal = new JButton("=");
		clear = new JButton("c");
		
		panel.add(b1);
		panel.add(b2);
		panel.add(b3);
		panel.add(add);
		panel.add(b4);
		panel.add(b5);
		panel.add(b6);
		panel.add(sub);
		panel.add(b7);
		panel.add(b8);
		panel.add(b9);
		panel.add(mul);
		panel.add(clear);
		panel.add(b0);
		panel.add(equal);
		panel.add(div);
		
		frame.add(textfield, BorderLayout.NORTH);
		frame.add(panel, BorderLayout.CENTER);
		frame.setSize(400,400);
		frame.setVisible(true);
	}

}
